<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;

/* @var $this yii\web\View */
/* @var $model app\models\SamplePatient */

// $this->title = '更新'.Yii::$app->params['sample'][$type].'信息';

?>
<div class="sample-patient-update">

  <?php if (Yii::$app->request->get('type') == 'xna') : ?>
	  <?= $this->render('xna', [
	    'model' => $model,
        'alter' => isset($alter) ? $alter : '',
        'type' => isset($type) ? $type : 0,
	  ]) ?>
	<?php else : ?>

	<div class="sample-position-else-form myForm">

    <div class="alert alert-danger" id="error-msg"></div>
    
    <?php $form = ActiveForm::begin(['id' => 'XnaForm']); ?>

    <?= $form->field($alter, 'use_num')->textInput(['disabled' => true])->error(false) ?>

    <?= $form->field($alter, 'origin_density')->textInput(['disabled' => true])->error(false) ?>

    <?= $form->field($alter, 'use_time')->textInput(['disabled' => true])->error(false) ?><br />

    <?= $form->field($alter, 'use_name')->textArea(['maxlength' => true])->error(false) ?><br />

    <input type="hidden" id="status" value="update?id=<?= $alter->pk_id ?>&type=alter">
    <div class="form-group">
        <?= Html::Button('更新', ['class' => 'btn btn-primary', 'id' => 'submitButton']) ?>

        <?= Html::a('取消', '/sample/view-'.$info, ['class' => 'btn btn-success', 'id' => 'backBtn']) ?>
    </div>

    <?php ActiveForm::end(); ?>

	</div>
	<?php endif; ?>

</div>
